<template>
    <div>
        <h1>修改用户信息</h1>
        用户Id：<input type="text" id="userId">
        新的密码:<input type="text" id="userPwd">
        <input type="button" value="修改" @click="update()">
    </div>
</template>

<script>
export default {
    data() {
        return {
            userId: 0,
            userPwd: ""
        }
    },
    methods: {
        async update(userId, userPwd) {
            var userId = document.getElementById("userId").value;
            this.userId = userId

            var userPwd = document.getElementById("userPwd").value;
            this.userPwd = userPwd

            let paramObj = { userId: this.userId, userPwd: this.userPwd }
            let cutObj = await this.ajax.getSubmit("/api/users/update", paramObj)

            this.$router.push("/User")
        }
    }
}
</script>

<style>

</style>